package com.bgi.uims.module.sys.department.dto;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bgi.uims.common.dto.Common;

/**
 * 
 * ClassName:ManageArea 
 * Function: TODO 
 * Reason:	 TODO 
 * @CreateDate:2015年3月23日 上午11:01:23
 * @author   WEN
 * @version  
 * @since    JDK 1.7
 * @see
 */
public class Department extends Common{

	/**
	 * serialVersionUID:TODO(用一句话描述这个变量表示什么).
	 * @since JDK 1.7
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * ID
	 */
	private String departmentId;
	/**
	 * ID
	 */
	private String[] departmentIds;
	/**
	 * 编码
	 */
	private String departmentCode;
	/**
	 * 名称
	 */
	private String departmentName;
	/**
	 * 父节点ID
	 */
	private String parentId;
	/**
	 * 状态  0 禁用  1 可用
	 */
	private String departmentState;
	/**
	 * 记录创建者
	 */
	private String createUser;
	/**
	 * 记录创建时间
	 */
	private String createTime;
	/**
	 * 记录最后修改者
	 */
	private String lastModifiedUser;
	/**
	 * 记录最后修改时间
	 */
	private String lastModifiedTime;
	/**
	 * 前台展示：关闭状态
	 */
	private String id;
	/**
	 * 前台展示：关闭状态
	 */
	private String text;
	/**
	 * 前台展示：关闭状态
	 */
	private String state;
	/**
	 * 前台展示：父节点ID
	 */
	private String _parentId;
	/**
	 * 前台展示：父节点名称
	 */
	private String parentName;
	/**
	 * 辅助属性，查询不需要的菜单信息
	 */
	private String excludeId;
	/**
	 * 辅助属性，查询不需要的菜单信息
	 */
	private String[] excludeIds;
	/**
	 * 前台展示：子节点
	 */
	List<Department> children;
	public String getDepartmentId() {
		return departmentId;
	}
	public void setDepartmentId(String departmentId) {
		this.departmentId = departmentId;
		this.id = departmentId;
	}
	public String[] getDepartmentIds() {
		return departmentIds;
	}
	public void setDepartmentIds(String[] departmentIds) {
		this.departmentIds = departmentIds;
	}
	public String getDepartmentCode() {
		return departmentCode;
	}
	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}
	public String getDepartmentName() {
		return departmentName;
	}
	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
		this.text = departmentName;
	}
	public String getParentId() {
		return parentId;
	}
	public void setParentId(String parentId) {
		this.parentId = parentId;
		this._parentId = parentId;
	}
	public String getDepartmentState() {
		return departmentState;
	}
	public void setDepartmentState(String departmentState) {
		this.departmentState = departmentState;
	}
	public String get_parentId() {
		return _parentId;
	}
	public void set_parentId(String _parentId) {
		this._parentId = _parentId;
	}
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public String getLastModifiedUser() {
		return lastModifiedUser;
	}
	public void setLastModifiedUser(String lastModifiedUser) {
		this.lastModifiedUser = lastModifiedUser;
	}
	public String getLastModifiedTime() {
		return lastModifiedTime;
	}
	public void setLastModifiedTime(String lastModifiedTime) {
		this.lastModifiedTime = lastModifiedTime;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public List<Department> getChildren() {
		return children;
	}
	public void setChildren(List<Department> children) {
		this.children = children;
	}
	public String getParentName() {
		return parentName;
	}
	public void setParentName(String parentName) {
		this.parentName = parentName;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getExcludeId() {
		return excludeId;
	}
	public void setExcludeId(String excludeId) {
		this.excludeId = excludeId;
	}
	public String[] getExcludeIds() {
		return excludeIds;
	}
	public void setExcludeIds(String[] excludeIds) {
		this.excludeIds = excludeIds;
	}
	/**
	 * 将对象的信息以map形式返回，作为存储日志信息时的比较和存储
	 */
	public Map annotationObject(){
		Map<String,String> results = new HashMap<String, String>();
		results.put("object","组织");//必须有,对象描述
		results.put("table","sys_department");//必须有,表名描述
		results.put("tableId",this.departmentId);//必须有,表名描述
		results.put("describe","组织名称名"+this.departmentName);//必须有,可以指定到具体某一条，即该条的独有特性,可以描述此记录
		results.put("组织ID号", this.departmentId);
		results.put("组织名称", this.departmentName);
		results.put("组织编号", this.departmentCode);
		results.put("上级组织名称", this.parentName);
		String status = "";
		if(this.departmentState != null && this.departmentState.equals("1")){
			status = "启用";
		} else {
			status = "禁用";
		}
		results.put("组织状态", status);
		results.put("SELECT查询不需要的组织ID号", this.excludeId);
		return results;
	}
}

